package com.zzw.live;

import android.content.Context;
import android.graphics.SurfaceTexture;
import android.opengl.GLSurfaceView;

public class CameraGLSurfaceView extends GLSurfaceView {
    private CameraRenderer mRenderer;
    private SurfaceTexture mSurfaceTexture;

    public CameraGLSurfaceView(Context context) {
        super(context);
        setEGLContextClientVersion(3);
        mRenderer = new CameraRenderer(this);
        setRenderer(mRenderer);
        setRenderMode(GLSurfaceView.RENDERMODE_WHEN_DIRTY);
    }

    public SurfaceTexture getSurfaceTexture() {
        return mSurfaceTexture;
    }

    public void setSurfaceTexture(SurfaceTexture surfaceTexture) {
        mSurfaceTexture = surfaceTexture;
    }
}